<?php
session_start();
if(isset($_SESSION['name'])){
    echo "帐户信息：<br/>";
    echo "用户名：".$_SESSION["name"]."<br/>";
    echo "密码：".$_SESSION["pw"]."<br/>";
    echo '<a href="logout.php?action=logout">注销</a>';
}else{
    echo '未登入用户不允许访问，<a href="login.php">请登入</a>';
}